// pagesPlatform/pages/orderCenter/index.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },
  goOrderList(e){
    var type = e.currentTarget.dataset.type;
    var isLogin = app.getStorageSync("isLogin");
    if(isLogin == 0){
      wx.navigateTo({
        url: '/pages/login/index',
      })
    }else{
      if(type == 'product'){
        this.goProductOrder();
      } else  if(type == 'charger'){
        this.goChargerOrder();
      } else  if(type == 'setmeal'){
        this.goSetMealOrder();
      } else  if(type == 'property_fee'){
        this.goPropertyFeeOrder();
      } else  if(type == 'intermediary'){
        this.goIntermediaryOrder();
      } else  if(type == 'vip'){
        this.goVipOrder();
      }
    }
  },
  goProductOrder(){
    wx.navigateTo({
      url: '/pages/order/productList/index?from_type=0&state=-1&index=0',
    })
  },
  goChargerOrder(){
    wx.navigateTo({
      url: '/pagesDevice/pages/charger/orderList/index',
    })
  },
  goSetMealOrder(){
    wx.navigateTo({
      url: '/pagesDevice/pages/charger/mealOrder/index',
    })
  },
  goPropertyFeeOrder(){
    wx.navigateTo({
      url: '/pagesProperty/pages/propertyList/index',
    })
  },
  goIntermediaryOrder(){
    wx.navigateTo({
      url: '/pagesProperty/pages/intermediary/order/index',
    })
  },
  goVipOrder(){
    wx.navigateTo({
      url: '/pagesMer/pages/vipOrder/index',
    })
  },
})